home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-11-16 | 690 b | 29 lines | [TEXT/MPS ] |
- ; pascal Boolean UTLock(Boolean *flag);
- ; issue BSET on bit 0 of byte pointed to by flagbyte
- ; returns TRUE if bit was 0, returns FALSE if bit was already set
-
- ; pascal calling conventions!!!
-
- UTLOCK: PROC EXPORT
-
- MOVE.L (SP)+,A0 ; return address
- MOVE.L (SP)+,A1 ; Boolean* argument
- CLR.W (SP) ; clear function return value (=FALSE)
- BSET #0,(A1) ; test and set bit
- BNE.S @1 ; skip around if bit was not zero
- MOVE.W #$0100,(SP) ; if bit was zero, then return TRUE
- @1 JMP (A0) ; jump to return address
-
- ENDPROC
-
- UTPEEKA6: PROC EXPORT
-
- ; follows pascal calling conventions
-
- MOVE.L A6,4(SP) ; copy A6 onto stack where the function result goes
- RTS
-
- ENDPROC
-
-
- END